function [wage_levels, wage_levels_static, real_consumption, real_consumption_static] = ...
    steady_state_simulation_static_gains(parameters,max_year_entry,import_tariff_entry,import_tariff_counterfactual)
place = {'US', 'OECD'};
set_parameters
initialize_vectors
import_tariff.US = import_tariff_entry;
import_tariff.OECD = import_tariff_entry;
wage_level_US_static_vec = [];
wage_level_OECD_static_vec = [];
real_consumption_US_static_vec = [];
real_consumption_OECD_static_vec = [];
dispersion_markups_consumed_static_US_vec = [];
dispersion_markups_consumed_static_OECD_vec = [];

year = 1;
max_year = max_year_entry;

% MAIN SIMULATION LOOP
while year<=max_year
    
    year_index = ['y' num2str(year)];
    if year > 1
        lag_year_index=['y' num2str(year-1)];
    end
    
    % SIMULATE INNOVATION PROCESS AND REASSIGN VARIETIES TO PRODUCERS
    innovation_and_assignment
        
    % ITERATE TO DETERMINE EQUILIBRIUM WAGES AND TRADE FLOWS
    if year >= 300
        import_tariff_temp.US = import_tariff_counterfactual;
        import_tariff_temp.OECD = import_tariff_counterfactual;
    [wage_static.OECD,omega_static,exports_static.US.(year_index),exports_static.OECD.(year_index),produced_static.US.(year_index),produced_static.OECD.(year_index),...
        nontraded_static.US.(year_index),nontraded_static.OECD.(year_index),~,~,~,~,...
        markups_static.US,markups_static.OECD,~,~,...
        ~,~,export_share_static.US,export_share_static.OECD,~,~,~,~,...
        ~,~,~,~,wage_level_static.US,wage_level_static.OECD,...
        ~,~,~,~,...
        real_consumption_static.US,real_consumption_static.OECD,~,~] = ...
        find_equilibrium(wage.OECD,qualities_vec.US,qualities_vec.OECD,domestic_competitor_qual_vec.US,domestic_competitor_qual_vec.OECD,...
        import_tariff_temp.US,import_tariff_temp.OECD,l.US,l.OECD,n_varieties,export_share.US(end),export_share.OECD(end),mu_bar.US(end),mu_bar.OECD(end));
    wage_level_US_static_vec = [wage_level_US_static_vec; wage_level_static.US];
    wage_level_OECD_static_vec = [wage_level_OECD_static_vec; wage_level_static.OECD];
    real_consumption_US_static_vec = [real_consumption_US_static_vec; real_consumption_static.US];
    real_consumption_OECD_static_vec = [real_consumption_OECD_static_vec; real_consumption_static.OECD];
    dispersion_markups_consumed_static_US_vec = [dispersion_markups_consumed_static_US_vec; std(log(markups_static.US))];
    dispersion_markups_consumed_static_OECD_vec = [dispersion_markups_consumed_static_OECD_vec; std(log(markups_static.OECD))];
    end
    
    [wage.OECD,omega,exports.US.(year_index),exports.OECD.(year_index),produced.US.(year_index),produced.OECD.(year_index),...
        nontraded.US.(year_index),nontraded.OECD.(year_index),prices.US.(year_index),prices.OECD.(year_index),output.US.(year_index),output.OECD.(year_index),...
        markups.US.(year_index),markups.OECD.(year_index),mu_bar.US(end+1),mu_bar.OECD(end+1),...
        nominal_GDP.US.(year_index),nominal_GDP.OECD.(year_index),export_share.US(end+1),export_share.OECD(end+1),revenue.US.(year_index),revenue.OECD.(year_index),x,m,...
        qualities_vec_consumed.US,qualities_vec_consumed.OECD,labor_share.US(end+1),labor_share.OECD(end+1),wage_level.US,wage_level.OECD,...
        P_bar.US.(year_index),P_bar.OECD.(year_index),total_income.US.(year_index),total_income.OECD.(year_index),...
        real_consumption.US.(year_index),real_consumption.OECD.(year_index),real_product_wage.US,real_product_wage.OECD] = ...
        find_equilibrium(wage.OECD,qualities_vec.US,qualities_vec.OECD,domestic_competitor_qual_vec.US,domestic_competitor_qual_vec.OECD,...
        import_tariff.US,import_tariff.OECD,l.US,l.OECD,n_varieties,export_share.US(end),export_share.OECD(end),mu_bar.US(end),mu_bar.OECD(end));
    
    % RUN FILE TO CALCULATE MOMENTS
    track_moments_within_loop    
       
    % UPDATE NEXT YEAR'S VARIETY OWNERSHIP BEFORE THE INNOVATION FOR THAT
    % YEAR BEGINS
    nxt_yr_index = ['y' num2str(year+1)];
    for cc=1:length(place)
    varown_vec.(place{cc}).(nxt_yr_index) = varown_vec.(place{cc}).(year_index);
    end
        
    l.US = population_growth*l.US;
    l.OECD = population_growth*l.OECD;
    
    year = year+1;
    
end

calculate_moments_after_loop

dispersion_consumed_markups_static = [mean(dispersion_markups_consumed_static_US_vec); ...
    mean(dispersion_markups_consumed_static_OECD_vec)];

% CHOOSE A FEW KEY MOMENTS TO OUTPUT FROM THE FUNCTION
wage_levels = [wage_level_vec.US(300:end) wage_level_vec.OECD(300:end)];
wage_levels_static = [wage_level_US_static_vec wage_level_OECD_static_vec];
real_consumption = [real_consumption_vec.US(300:end) real_consumption_vec.OECD(300:end)];
real_consumption_static = [real_consumption_US_static_vec real_consumption_OECD_static_vec];

end